package com.app.lan;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;
import java.io.Serializable;


public class Sender<T> implements Serializable{
	protected T object;
	private transient ObjectOutputStream stream;
        
	public Sender(ObjectOutputStream stream){
		this.stream = stream;
                //writer = new PrintWriter
	}
	
	public void send() throws IOException {
               
                stream.writeObject(object);
                stream.flush();
               
	}
	public void setObject(T object){
		this.object = object;
	}
	
}
